package com.xq.aop.xml;

import org.springframework.aop.ThrowsAdvice;

/**
 * @author xq
 * @version 1.0
 * @date 2021/4/6 14:58
 * @description 异常通知类
 */
public class MyThrowAdvise implements ThrowsAdvice {

    /**
     * 当目标对象有异常抛出时回调的此方法
     * @param rw 异常对象的名称
     */
    public void afterThrowing(Throwable rw) {
        System.out.println("产生异常："+rw.getMessage());
    }
}
